<script src="/assets/js/jquery.qtip-1.0.0-rc3.min.js" type="text/javascript"></script>
<script type="text/javascript">
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
onLoad="MM_preloadImages('/assets/images/btn_info_on.png','/assets/images/btn_enable_on.png','/assets/images/btn_pause_on.png','/assets/images/btn_promote_on.png','/assets/images/btn_customize_on.png','/assets/images/btn_delete_on.png')";
</script>


<div id="page" class="wrapper w_960 clearfix">
  <script type="text/javascript">
	$(function(){

		 $('.qtip').qtip({
			    content: 'Loading.......................',
			     position: {
			         corner: {
			            tooltip: 'bottomMiddle',
			            target: 'topMiddle'
			         },
			         adjust: {
			            resize: true,
			            scroll: true
			         }
			      },
			      style: {
			         name: 'light',
			         textAlign: 'left',
			         width: { max: 700 }, 
			         tip: true 
			      },
			        api: {
			            beforeShow: function()
			            {
			               var self = this;
			               var message = self.elements.target.attr("alt");
			               var _width = self.elements.target.attr("qtipWidth");
			               if(_width !=null && !isNaN(_width)) {
			            	   self.updateWidth(parseInt(_width));
				           }
			               self.updateContent(message);
			               
			            }
			         }
			  });

		
		$("#markNotified").livequery("click",function () {
			$.get("/customer/markNotified?t="+new Date().getTime()); 
			$(this).parent().hide();
		}); 
		$("#markFirstLoginNotified").livequery("click", function () {
				$.get("/customer/markFirstLoginNotified?t="+new Date().getTime(),function(data){
					if(data != null ){
						$("#notificationText").html(data);
						$("#markFirstLoginNotified").attr("id","markNotified");
					}else{
						$(this).parent().hide();
					}
				}); 
				
			}
		); 
	});
</script>

  <h2 class="heading">Dashboard</h2>
  <p>Welcome 德冰! Below you will see list of your blogs. To get started, please press on Add Blog button</p>
  <table cellpadding="0" cellspacing="0" border="0" summary="Dashboard" width="100%">
    <thead>
      <tr>
        <th class="col1">博客名</th>
        <th class="col2">博客地址</th>
        <th class="col4">状态</th>
        <th class="col6">读者</th>
        <th class="col7">操作</th>
      </tr>
    </thead>
    <tbody>
<?php
foreach ($blog_app as $app)
{
?>
	<tr>
	<td><a href="/blogger/edit/id/<?php echo $app->id; ?>"><?php echo $app->name; ?></a></td>
	<td><a><?php echo $app->url_feed; ?></a></td>
        <td><span class="status_3 status">Live</span></td>
        <td class="number">0</td>
		<td align="left">
			<a href="/blogger/edit/id/<?php echo $app->id; ?>" width="31" height="35" border="0">编辑</a> 
			<a href="/blogger/share/id/<?php echo $app->id; ?>" name="Promote" width="48" height="35" border="0">分享</a> 
			<a href="/blogger/preference/id/<?php echo $app->id; ?>" name="Customize" width="55" height="35" border="0">配置</a> 
			<a href="/blogger/delete/id/<?php echo $app->id; ?>" onclick="var bl=confirm('Are you sure you want to delete this blog?'); if(bl){return true;} else {return false;}" name="Delete Blog" width="44" height="35" border="0">删除</a> 
		</td>
      </tr>
<?php
}
?>
    </tbody>
    <tfoot>
    </tfoot>
  </table>
  <div class="add_action a_left"> <a href="/blogger/add" class="submit">+ 博客</a> </div>
</div>
